package com.acwing.lc.part1;

/**
 * @author rkc
 * @date 2022/9/18 10:06
 */
public class LC70爬楼梯 {

    public int climbStairs(int n) {
        int[] f = new int[n + 10];
        f[1] = 1;
        f[2] = 2;
        for (int i = 3; i <= n; i++) f[i] = f[i - 1] + f[i - 2];
        return f[n];
    }
}
